package com.wisdytech.ccdserver.action.matchwarning;

import com.wisdytech.ccdserver.matchwarning.api.ICcdWarningMatchMngService;
import com.wisdytech.ccdserver.matchwarning.model.WarningMesSandstone;
import com.wisdytech.ccdserver.matchwarning.vo.WarningEquipmentVo;
import com.wisdytech.common.bean.Filter;
import com.wisdytech.common.bean.MultiResultResponse;
import com.wisdytech.common.bean.UniqueResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author SV00216491
 * @description: TODO
 * @date 2024-04-01 14:32:27
 * @version: 1.0
 */

@RestController
@RequestMapping("ccdmatch/warningAction/")
public class MatchWarningAction {
    @Autowired
    private ICcdWarningMatchMngService warningMatchService;

    @RequestMapping("getWarningEquipmentList")
    public MultiResultResponse getWarningEquipmentList(Filter filter) throws Exception {
        MultiResultResponse warningEquipmentList = warningMatchService.getWarningEquipmentList(filter);
        return warningEquipmentList;
    }


    @RequestMapping("getWarningMesSandstoneList")
    public MultiResultResponse getWarningMesSandstoneList(Filter filter) throws Exception {
        MultiResultResponse warningEquipmentList = warningMatchService.getWarningMesSandstoneList(filter);
        return warningEquipmentList;
    }

    @RequestMapping("getWarningMesProductionList")
    public MultiResultResponse getWarningMesProductionList(Filter filter) throws Exception {
        MultiResultResponse warningEquipmentList = warningMatchService.getWarningMesProductionList(filter);
        return warningEquipmentList;
    }

    @RequestMapping("getWarningMatchList")
    public MultiResultResponse getWarningMatchList(Filter filter) throws Exception {
        MultiResultResponse warningEquipmentList = warningMatchService.getWarningMatchList(filter);
        return warningEquipmentList;
    }

    @RequestMapping("getWarningSandstoneImageList")
    public MultiResultResponse getWarningSandstoneImageList(Filter filter) throws Exception {
        MultiResultResponse warningEquipmentList = warningMatchService.getWarningSandstoneImageList(filter);
        return warningEquipmentList;
    }


    @RequestMapping("saveOrUpdateWarningMesSandstone")
    public UniqueResultResponse<Boolean> saveOrUpdateWarningMesSandstone(@RequestBody WarningMesSandstone warningMesSandstone){
        return warningMatchService.saveOrUpdateWarningMesSandstone(warningMesSandstone);
    }

    @RequestMapping("saveOrUpdateWarningEquipment")
    public UniqueResultResponse<Boolean> saveOrUpdateWarningEquipment(@RequestBody WarningEquipmentVo warningEquipmentVo){
        return warningMatchService.saveOrUpdateWarningEquipment(warningEquipmentVo);
    }

    @RequestMapping("countMatch")
    public UniqueResultResponse countMatch(Filter filter) throws Exception {
        UniqueResultResponse warningEquipmentList = warningMatchService.countMatch(filter);
        return warningEquipmentList;
    }

}
